Field
The present embodiments are generally related to synchronization of metadata structures in a multi-threaded system by using a plurality of synchronization mechanisms coupled with compare and swap (CAS).
Background Art
Conventional relational database management systems synchronize access to object metadata which is stored in a metadata cache. The metadata cache may include a local cache for each object and a global cache which provides navigation across all local caches The conventional systems utilize a single synchronization mechanism such as a spinlock or mutex to protect the global cache and all local caches. If a task desires to operate on any of the local caches or the global cache, the task acquires the spinlock or mutex to gain exclusive access to the global cache and local caches. However, because of the single synchronization mechanism, it is not possible for multiple threads of a processor to concurrently operate. Thus, the single synchronization mechanism is a performance bottleneck in highly concurrent systems.